import loadable from '@/router/route-config';

export const routes = [
  {
    path: '/home',
    auth: true,
    component: loadable(() => import('@/pages/home/index'))
  },
  {
    path: '/personal-center',
    auth: true,
    exact: true,
    component: loadable(() => import('@/pages/personal-center/index'))
  },
  {
    path: '/personal-center/my-create',
    auth: true,
    component: loadable(() =>
      import('@/pages/personal-center/my-create/index')
    )
  },
  {
    path: '/personal-center/my-declare',
    auth: true,
    component: loadable(() =>
      import('@/pages/personal-center/my-declare/index')
    )
  },
  {
    path: '/personal-info',
    auth: true,
    component: loadable(() => import('@/pages/personal-info/index'))
  },
  {
    path: '/login',
    component: loadable(() => import('@/pages/login/index'))
  },
  {
    path: '/404',
    component: loadable(() => import('@/pages/404'))
  },

  // 审批路由
  {
    path: '/approval_login',
    exact: true,
    component: loadable(() => import('@/pages/approval_login'))
  },
  {
    path: '/approval',
    exact: true,
    component: loadable(() => import('@/pages/approval/index'))
  },
  {
    path: '/approval/action',
    component: loadable(() => import('@/pages/approval/content/action/index'))
  },
  {
    path: '/approvalList',
    component: loadable(() => import('@/pages/approval-list/index'))
  },
  {
    path: '/apply',
    name: 'apply',
    auth: true,
    component: loadable(() => import('@/pages/apply/index'))
  },
  {
    path: '/resubmit',
    name: 'resubmit',
    auth: true,
    component: loadable(() => import('@/pages/resubmit/index'))
  },
  {
    path: '/formDetail',
    name: 'formDetail',
    component: loadable(() => import('@/pages/example-formDetail'))
  },
  {
    path: '/formEdit',
    name: 'formEdit',
    component: loadable(() => import('@/pages/example-formEdit'))
  },
  {
    path: '/previewPdf/:id',
    name: 'previewPdf',
    component: loadable(() => import('@/components/preview-pdf/index'))
  }
];
